<?php
    // 接受前端发送过来的数据
    $page = $_GET["page"];
    $page *= 9;
    // 链接数据库
    $conn = mysqli_connect("localhost", "root", "123456", "sbeam");
    // 查询
    $result = mysqli_query($conn, "SELECT * FROM home limit $page , 9");
    // 判断有没有查询到内容
    $arr = mysqli_fetch_all($result,MYSQLI_ASSOC);
    echo json_encode($arr);
?>